package com.uphone.kingmall.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.china.zhuoyue.R;
import com.uphone.kingmall.bean.UserGroupsBean;
import com.uphone.kingmall.utils.CommonUtil;
import com.uphone.kingmall.utils.GlideUtils;

/**
 * <pre>
 *     author : 王雨
 *     e-mail :
 *     time   : 2018/07/31
 *     desc   :
 *     version: 1.0
 * </pre>
 */
public class MyTeamAdapter extends BaseQuickAdapter<UserGroupsBean.UserGroupBean, BaseViewHolder> {
    public MyTeamAdapter() {
        super(R.layout.kingmall_item_my_team);
    }

    @Override
    protected void convert(BaseViewHolder helper, UserGroupsBean.UserGroupBean item) {
        ImageView iv_icon = helper.getView(R.id.iv_icon);
        GlideUtils.getInstance().loadNormalImage(mContext, CommonUtil.getStr(item.getUserPhoto()), iv_icon);
        helper.setText(R.id.tv_time, item.getCreateTime());
        helper.setText(R.id.tv_nickname, "昵称：" + item.getUserName() + "");
        helper.setText(R.id.tv_account, "账号：" + item.getUserMobile() + "");
    }
}
